STEP 11: To place objects randomly on the stage, we need to first generate some random x-y coordinates!

  • Change the first random variable name from my_var to rand_x.
  • Change the arguments in the first randint() so rand_x will be a random number between -200 and 200.
  • Change the second random variable name from my_var to rand_y
  • Change the arguments in the second randint() so rand_y will be a random number between 0 and 200.

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)